import {LogPageResult, OperLogQuery} from "./types";
import {AxiosPromise} from "axios";
import request from "@/utils/request";

export function listLogs(queryParams?: OperLogQuery): AxiosPromise<LogPageResult> {
  return request({
    url: "/api/v1/logs/oper/page",
    method: "get",
    params: queryParams,
  });
}
export function exportLog(queryParams: OperLogQuery) {
  return request({
    url: "/api/v1/logs/oper/export",
    method: "get",
    params: queryParams,
    responseType: "arraybuffer",
  });
}
